import request from '@/utils/request'

// 查询用户个人信息
export function getProfileApi() {
  return request.get('/system/common/profile')
}

// 修改用户个人信息
export function updateProfileApi(data) {
  return request.post('/system/common/profile', data)
}

// 用户密码重置
export function updateUserPwdApi(oldPassword, newPassword) {
  return request.post('/system/common/update-pass', { new_pwd: newPassword, old_pwd: oldPassword })
}

// 用户头像上传
export function uploadAvatarApi(data) {
  return request.upload('/system/common/upload-avatar', data)
}
